var app = angular.module('app', []);

app.config([ '$httpProvider', function($httpProvider) {
	$httpProvider.interceptors.push([ '$q', function($q) {
		return {
			'request' : function(config) {
				var stid = $("#stid").val() || '';
				config.headers = config.headers || {};
				console.log(config.headers);
				if(stid){
					config.headers['sellerSource'] = stid;
				}
				return config;
			},
			'response' : function(response) {

				return $q.resolve(response);
			},
			'responseError' : function(response) {
				return $q.reject(response);
			}
		};
	} ]);
} ]);